<!DOCTYPE html>
<html>
    <head>
        <title>demo</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <style>
            body {
                font-family: Monospace;
                background-color: #f0f0f0;
                margin: 0px;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <script src="https://cdn.bootcdn.net/ajax/libs/three.js/73/three.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/tween.js/0.11.0/Tween.min.js"></script>
		<script src="https://unpkg.com/three@0.73.1/examples/js/controls/TrackballControls.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/stats.js/10/Stats.min.js"></script>
        <script>

            var jsonstr = '[{"boxId":"94266080107U424","x":-78.699997,"y":-18.950001,"z":-559.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":1,"material":"","type":1,"place":100},{"boxId":"94266080107U478","x":-4.300000,"y":-18.950001,"z":-559.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":2,"material":"","type":1,"place":100},{"boxId":"94266080107U458","x":70.099998,"y":-18.950001,"z":-559.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":3,"material":"","type":1,"place":100},{"boxId":"94266080107U432","x":-78.699997,"y":-18.950001,"z":-486.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":4,"material":"","type":1,"place":100},{"boxId":"94266080107U372","x":-4.300000,"y":-18.950001,"z":-486.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":5,"material":"","type":1,"place":100},{"boxId":"94266080107U482","x":70.099998,"y":-18.950001,"z":-486.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":6,"material":"","type":1,"place":100},{"boxId":"94266080107U400","x":-78.699997,"y":-18.950001,"z":-413.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":7,"material":"","type":1,"place":100},{"boxId":"94266080107U450","x":-4.300000,"y":-18.950001,"z":-413.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":8,"material":"","type":1,"place":100},{"boxId":"94266080107U470","x":70.099998,"y":-18.950001,"z":-413.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":9,"material":"","type":1,"place":100},{"boxId":"94266080107U370","x":-78.699997,"y":-18.950001,"z":-340.500000,"width":74.400002,"height":222.100006,"length":73.000000,"weight":115.000000,"platform":"platform02","order":10,"material":"","type":1,"place":100},{"boxId":"94266080107S168","x":-2.000000,"y":-95.250000,"z":-347.000000,"width":60.000000,"height":69.500000,"length":79.000000,"weight":60.500000,"platform":"platform03","order":11,"material":"","type":1,"place":200},{"boxId":"94266080107Y787","x":-2.000000,"y":-25.750000,"z":-347.000000,"width":60.000000,"height":69.500000,"length":79.000000,"weight":50.500000,"platform":"platform03","order":12,"material":"","type":1,"place":200},{"boxId":"94266080107Y797","x":-58.900002,"y":-68.599998,"z":-155.000000,"width":114.000000,"height":122.800003,"length":298.000000,"weight":568.000000,"platform":"platform03","order":13,"material":"","type":1,"place":100},{"boxId":"94266080107S167","x":-58.900002,"y":53.900002,"z":-154.899994,"width":114.000000,"height":122.199997,"length":298.200012,"weight":597.500000,"platform":"platform03","order":14,"material":"","type":1,"place":100},{"boxId":"94266080107Y792","x":55.099998,"y":-68.900002,"z":-168.000000,"width":114.000000,"height":122.199997,"length":298.000000,"weight":568.500000,"platform":"platform03","order":15,"material":"","type":1,"place":100},{"boxId":"94266080107S166","x":55.099998,"y":40.000000,"z":-168.000000,"width":114.000000,"height":95.599998,"length":298.000000,"weight":441.500000,"platform":"platform03","order":16,"material":"","type":1,"place":100},{"boxId":"94266080107S165","x":24.850000,"y":101.699997,"z":-168.000000,"width":53.500000,"height":27.799999,"length":298.000000,"weight":62.000000,"platform":"platform03","order":17,"material":"","type":1,"place":100},{"boxId":"94266080107Y796","x":-58.799999,"y":-95.000000,"z":143.199997,"width":114.199997,"height":70.000000,"length":298.000000,"weight":330.500000,"platform":"platform03","order":18,"material":"","type":1,"place":100},{"boxId":"94266080107Y791","x":-58.900002,"y":-25.000000,"z":143.199997,"width":114.000000,"height":70.000000,"length":298.000000,"weight":329.500000,"platform":"platform03","order":19,"material":"","type":1,"place":100},{"boxId":"94266080107Q358","x":-58.900002,"y":65.699997,"z":27.700001,"width":67.000000,"height":111.400002,"length":114.000000,"weight":147.500000,"platform":"platform04","order":20,"material":"","type":1,"place":200},{"boxId":"94266080107L593","x":-55.900002,"y":52.250000,"z":101.199997,"width":80.000000,"height":84.500000,"length":120.000000,"weight":91.199997,"platform":"platform04","order":21,"material":"","type":1,"place":200},{"boxId":"94266080107R983","x":-60.900002,"y":40.500000,"z":196.199997,"width":110.000000,"height":61.000000,"length":110.000000,"weight":89.000000,"platform":"platform04","order":22,"material":"","type":1,"place":100},{"boxId":"94266080107Y601","x":44.099998,"y":-84.500000,"z":24.200001,"width":60.000000,"height":91.000000,"length":80.000000,"weight":100.599998,"platform":"platform04","order":23,"material":"","type":1,"place":200},{"boxId":"94266080107P986","x":65.199997,"y":107.099998,"z":-560.400024,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.050000,"platform":"platform08","order":24,"material":"","type":1,"place":100},{"boxId":"94266080107P988","x":92.400002,"y":107.099998,"z":-560.400024,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.050000,"platform":"platform08","order":25,"material":"","type":1,"place":100},{"boxId":"94266080107P982","x":65.199997,"y":107.099998,"z":-489.200012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":4.900000,"platform":"platform08","order":26,"material":"","type":1,"place":100},{"boxId":"94266080107P984","x":92.400002,"y":107.099998,"z":-489.200012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":4.850000,"platform":"platform08","order":27,"material":"","type":1,"place":100},{"boxId":"94266080107W847","x":68.849998,"y":96.849998,"z":-440.850006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.550000,"platform":"platform08","order":28,"material":"","type":1,"place":200},{"boxId":"94266080106Y969","x":68.849998,"y":96.849998,"z":-415.350006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.550000,"platform":"platform08","order":29,"material":"","type":1,"place":200},{"boxId":"94266080107W852","x":68.849998,"y":96.849998,"z":-389.850006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.550000,"platform":"platform08","order":30,"material":"","type":1,"place":200},{"boxId":"94266080107W844","x":68.849998,"y":106.349998,"z":-440.850006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.550000,"platform":"platform08","order":31,"material":"","type":1,"place":200},{"boxId":"94266080107W860","x":68.849998,"y":106.349998,"z":-415.350006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":32,"material":"","type":1,"place":200},{"boxId":"94266080107W840","x":68.849998,"y":106.349998,"z":-389.850006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":33,"material":"","type":1,"place":200},{"boxId":"94266080107W854","x":68.849998,"y":115.849998,"z":-440.850006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":34,"material":"","type":1,"place":200},{"boxId":"94266080107W863","x":68.849998,"y":115.849998,"z":-415.350006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":35,"material":"","type":1,"place":200},{"boxId":"94266080107W864","x":68.849998,"y":115.849998,"z":-389.850006,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.450000,"platform":"platform08","order":36,"material":"","type":1,"place":200},{"boxId":"94266080107W822","x":62.500000,"y":125.199997,"z":-444.950012,"width":17.299999,"height":9.200000,"length":21.799999,"weight":0.300000,"platform":"platform08","order":37,"material":"","type":1,"place":200},{"boxId":"94266080107W813","x":62.500000,"y":125.199997,"z":-427.649994,"width":17.299999,"height":9.200000,"length":21.799999,"weight":0.200000,"platform":"platform08","order":38,"material":"","type":1,"place":200},{"boxId":"942660801080565","x":77.849998,"y":98.050003,"z":-295.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.850000,"platform":"platform08","order":39,"material":"","type":1,"place":200},{"boxId":"942660801080590","x":77.849998,"y":98.050003,"z":-253.250000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.850000,"platform":"platform08","order":40,"material":"","type":1,"place":200},{"boxId":"942660801080581","x":77.849998,"y":98.050003,"z":-210.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.850000,"platform":"platform08","order":41,"material":"","type":1,"place":200},{"boxId":"942660801080586","x":77.849998,"y":98.050003,"z":-168.250000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":42,"material":"","type":1,"place":200},{"boxId":"942660801080593","x":77.849998,"y":98.050003,"z":-125.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":43,"material":"","type":1,"place":200},{"boxId":"942660801080594","x":77.849998,"y":118.550003,"z":-295.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":44,"material":"","type":1,"place":200},{"boxId":"942660801080587","x":77.849998,"y":118.550003,"z":-253.250000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":45,"material":"","type":1,"place":200},{"boxId":"94266080106Y893","x":77.849998,"y":118.550003,"z":-210.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":46,"material":"","type":1,"place":200},{"boxId":"942660801080567","x":77.849998,"y":118.550003,"z":-168.250000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":47,"material":"","type":1,"place":200},{"boxId":"942660801080583","x":77.849998,"y":118.550003,"z":-125.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":48,"material":"","type":1,"place":200},{"boxId":"94266080107P974","x":71.849998,"y":107.050003,"z":-65.250000,"width":40.500000,"height":38.500000,"length":78.500000,"weight":23.049999,"platform":"platform08","order":49,"material":"","type":1,"place":100},{"boxId":"94266080107P972","x":-89.800003,"y":98.500000,"z":163.800003,"width":45.200001,"height":55.000000,"length":52.200001,"weight":15.900000,"platform":"platform08","order":50,"material":"","type":1,"place":200},{"boxId":"94266080107P973","x":-37.599998,"y":98.500000,"z":163.800003,"width":45.200001,"height":55.000000,"length":52.200001,"weight":15.800000,"platform":"platform08","order":51,"material":"","type":1,"place":200},{"boxId":"94266080107P985","x":-96.400002,"y":96.250000,"z":215.899994,"width":39.000000,"height":50.500000,"length":59.000000,"weight":26.750000,"platform":"platform08","order":52,"material":"","type":1,"place":100},{"boxId":"94266080107P987","x":-57.400002,"y":96.250000,"z":215.899994,"width":39.000000,"height":50.500000,"length":59.000000,"weight":26.750000,"platform":"platform08","order":53,"material":"","type":1,"place":100},{"boxId":"94266080107P981","x":-18.400000,"y":96.250000,"z":215.899994,"width":39.000000,"height":50.500000,"length":59.000000,"weight":26.700001,"platform":"platform08","order":54,"material":"","type":1,"place":100},{"boxId":"94266080107P975","x":-76.650002,"y":29.250000,"z":271.450012,"width":40.500000,"height":38.500000,"length":78.500000,"weight":22.950001,"platform":"platform08","order":55,"material":"","type":1,"place":200},{"boxId":"94266080107P983","x":-86.400002,"y":73.750000,"z":270.700012,"width":39.000000,"height":50.500000,"length":59.000000,"weight":26.700001,"platform":"platform08","order":56,"material":"","type":1,"place":200},{"boxId":"94266080107S141","x":12.350000,"y":120.349998,"z":-298.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":3.660000,"platform":"platform09","order":57,"material":"","type":1,"place":100},{"boxId":"94266080107S164","x":34.849998,"y":120.349998,"z":-298.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":2.020000,"platform":"platform09","order":58,"material":"","type":1,"place":100},{"boxId":"94266080107W843","x":12.350000,"y":120.349998,"z":-260.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":1.500000,"platform":"platform09","order":59,"material":"","type":1,"place":100},{"boxId":"94266080107X616","x":34.849998,"y":120.349998,"z":-260.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":1.280000,"platform":"platform09","order":60,"material":"","type":1,"place":100},{"boxId":"94266080107S184","x":12.350000,"y":120.349998,"z":-223.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":1.280000,"platform":"platform09","order":61,"material":"","type":1,"place":100},{"boxId":"94266080107X327","x":34.849998,"y":120.349998,"z":-223.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":1.060000,"platform":"platform09","order":62,"material":"","type":1,"place":100},{"boxId":"94266080107Q569","x":12.350000,"y":120.349998,"z":-185.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.880000,"platform":"platform09","order":63,"material":"","type":1,"place":100},{"boxId":"94266080107U459","x":34.849998,"y":120.349998,"z":-185.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.780000,"platform":"platform09","order":64,"material":"","type":1,"place":100},{"boxId":"94266080107U401","x":12.350000,"y":120.349998,"z":-148.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.780000,"platform":"platform09","order":65,"material":"","type":1,"place":100},{"boxId":"94266080107U483","x":34.849998,"y":120.349998,"z":-148.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.780000,"platform":"platform09","order":66,"material":"","type":1,"place":100},{"boxId":"94266080107U451","x":12.350000,"y":120.349998,"z":-110.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.760000,"platform":"platform09","order":67,"material":"","type":1,"place":100},{"boxId":"94266080107U479","x":34.849998,"y":120.349998,"z":-110.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.760000,"platform":"platform09","order":68,"material":"","type":1,"place":100},{"boxId":"94266080107U425","x":12.350000,"y":120.349998,"z":-73.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.760000,"platform":"platform09","order":69,"material":"","type":1,"place":100},{"boxId":"94266080107U471","x":34.849998,"y":120.349998,"z":-73.250000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.760000,"platform":"platform09","order":70,"material":"","type":1,"place":100},{"boxId":"94266080107S175","x":18.850000,"y":120.599998,"z":-35.250000,"width":35.500000,"height":10.000000,"length":38.500000,"weight":3.760000,"platform":"platform09","order":71,"material":"","type":1,"place":100},{"boxId":"94266080107W812","x":101.449997,"y":98.099998,"z":-75.050003,"width":18.700001,"height":20.600000,"length":58.900002,"weight":2.440000,"platform":"platform09","order":72,"material":"","type":1,"place":100},{"boxId":"94266080107U373","x":103.349998,"y":113.150002,"z":-85.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.760000,"platform":"platform09","order":73,"material":"","type":1,"place":100},{"boxId":"94266080107U371","x":103.349998,"y":122.650002,"z":-85.750000,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.740000,"platform":"platform09","order":74,"material":"","type":1,"place":100},{"boxId":"94266080107R638","x":-86.400002,"y":114.500000,"z":270.700012,"width":39.000000,"height":31.000000,"length":59.000000,"weight":23.740000,"platform":"platform09","order":75,"material":"","type":1,"place":200},{"boxId":"94266080107U433","x":-45.650002,"y":53.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.740000,"platform":"platform09","order":76,"material":"","type":1,"place":100},{"boxId":"94266080107U160","x":-45.650002,"y":62.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.700000,"platform":"platform09","order":77,"material":"","type":1,"place":100},{"boxId":"94266080107U176","x":-45.650002,"y":72.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.700000,"platform":"platform09","order":78,"material":"","type":1,"place":100},{"boxId":"94266080107U156","x":-45.650002,"y":81.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.700000,"platform":"platform09","order":79,"material":"","type":1,"place":100},{"boxId":"94266080107U203","x":-45.650002,"y":91.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.680000,"platform":"platform09","order":80,"material":"","type":1,"place":100},{"boxId":"94266080107U154","x":-45.650002,"y":100.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.680000,"platform":"platform09","order":81,"material":"","type":1,"place":100},{"boxId":"94266080107U182","x":-45.650002,"y":110.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.680000,"platform":"platform09","order":82,"material":"","type":1,"place":100},{"boxId":"94266080107U186","x":-45.650002,"y":119.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.680000,"platform":"platform09","order":83,"material":"","type":1,"place":100},{"boxId":"94266080107U180","x":-23.150000,"y":14.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.680000,"platform":"platform09","order":84,"material":"","type":1,"place":100},{"boxId":"94266080107U152","x":-23.150000,"y":24.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.680000,"platform":"platform09","order":85,"material":"","type":1,"place":100},{"boxId":"94266080107L806","x":-23.150000,"y":33.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.660000,"platform":"platform09","order":86,"material":"","type":1,"place":100},{"boxId":"94266080107U174","x":-23.150000,"y":43.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.640000,"platform":"platform09","order":87,"material":"","type":1,"place":100},{"boxId":"94266080107W591","x":-23.150000,"y":52.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.540000,"platform":"platform09","order":88,"material":"","type":1,"place":100},{"boxId":"94266080107Q566","x":-23.150000,"y":62.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.520000,"platform":"platform09","order":89,"material":"","type":1,"place":100},{"boxId":"94266080107S179","x":-23.150000,"y":71.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.500000,"platform":"platform09","order":90,"material":"","type":1,"place":100},{"boxId":"94266080107Q567","x":-23.150000,"y":81.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.500000,"platform":"platform09","order":91,"material":"","type":1,"place":100},{"boxId":"94266080107Q568","x":-23.150000,"y":90.750000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.480000,"platform":"platform09","order":92,"material":"","type":1,"place":100},{"boxId":"94266080107S147","x":-23.150000,"y":100.250000,"z":269.950012,"width":22.500000,"height":9.500000,"length":37.500000,"weight":0.280000,"platform":"platform09","order":93,"material":"","type":1,"place":100},{"boxId":"94266080107X678","x":43.200001,"y":-11.500000,"z":14.300000,"width":40.200001,"height":55.000000,"length":78.199997,"weight":41.000000,"platform":"platform09","order":94,"material":"","type":1,"place":200},{"boxId":"94266080107R792","x":43.200001,"y":43.500000,"z":14.300000,"width":40.200001,"height":55.000000,"length":78.199997,"weight":20.000000,"platform":"platform09","order":95,"material":"","type":1,"place":200},{"boxId":"94266080107W650","x":43.200001,"y":98.500000,"z":14.300000,"width":40.200001,"height":55.000000,"length":78.199997,"weight":16.500000,"platform":"platform09","order":96,"material":"","type":1,"place":200},{"boxId":"94266080107S268","x":59.099998,"y":-68.599998,"z":109.199997,"width":110.000000,"height":122.800003,"length":110.000000,"weight":110.500000,"platform":"platform09","order":97,"material":"","type":1,"place":100},{"boxId":"94266080107R640","x":59.099998,"y":54.200001,"z":109.199997,"width":110.000000,"height":122.800003,"length":110.000000,"weight":110.500000,"platform":"platform09","order":98,"material":"","type":1,"place":100},{"boxId":"94266080107Q565","x":23.350000,"y":120.599998,"z":71.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":3.540000,"platform":"platform09","order":99,"material":"","type":1,"place":200},{"boxId":"94266080107Q564","x":61.849998,"y":120.599998,"z":71.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":2.360000,"platform":"platform09","order":100,"material":"","type":1,"place":200},{"boxId":"94266080107Q562","x":23.350000,"y":120.599998,"z":107.449997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.640000,"platform":"platform09","order":101,"material":"","type":1,"place":200},{"boxId":"94266080107S129","x":61.849998,"y":120.599998,"z":107.449997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.540000,"platform":"platform09","order":102,"material":"","type":1,"place":200},{"boxId":"94266080107W842","x":23.350000,"y":120.599998,"z":142.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.220000,"platform":"platform09","order":103,"material":"","type":1,"place":200},{"boxId":"94266080107R778","x":61.849998,"y":120.599998,"z":142.949997,"width":35.500000,"height":10.000000,"length":38.500000,"weight":1.040000,"platform":"platform09","order":104,"material":"","type":1,"place":200},{"boxId":"94266080107U349","x":98.199997,"y":121.599998,"z":87.300003,"width":34.200001,"height":12.000000,"length":66.199997,"weight":2.100000,"platform":"platform09","order":105,"material":"","type":1,"place":100},{"boxId":"94266080107R639","x":44.099998,"y":-92.250000,"z":224.199997,"width":80.000000,"height":75.500000,"length":120.000000,"weight":56.500000,"platform":"platform09","order":106,"material":"","type":1,"place":100},{"boxId":"94266080107S259","x":44.099998,"y":-16.750000,"z":224.199997,"width":80.000000,"height":75.500000,"length":120.000000,"weight":55.500000,"platform":"platform09","order":107,"material":"","type":1,"place":100},{"boxId":"94266080107S116","x":44.099998,"y":58.750000,"z":224.199997,"width":80.000000,"height":75.500000,"length":120.000000,"weight":55.500000,"platform":"platform09","order":108,"material":"","type":1,"place":100},{"boxId":"94266080107U715","x":42.150002,"y":112.099998,"z":193.399994,"width":58.400002,"height":31.200001,"length":76.099998,"weight":32.020000,"platform":"platform09","order":109,"material":"","type":1,"place":200},{"boxId":"94266080107U714","x":42.150002,"y":112.099998,"z":251.800003,"width":58.400002,"height":31.200001,"length":76.099998,"weight":32.020000,"platform":"platform09","order":110,"material":"","type":1,"place":200},{"boxId":"94266080107R641","x":-60.900002,"y":-68.599998,"z":347.200012,"width":110.000000,"height":122.800003,"length":110.000000,"weight":110.000000,"platform":"platform09","order":111,"material":"","type":1,"place":100},{"boxId":"94266080107S267","x":-60.900002,"y":44.299999,"z":347.200012,"width":110.000000,"height":103.000000,"length":110.000000,"weight":93.000000,"platform":"platform09","order":112,"material":"","type":1,"place":100},{"boxId":"94266080107Y819","x":-97.150002,"y":107.550003,"z":310.450012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":7.380000,"platform":"platform09","order":113,"material":"","type":1,"place":200},{"boxId":"94266080107R772","x":-59.650002,"y":107.550003,"z":310.450012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":7.340000,"platform":"platform09","order":114,"material":"","type":1,"place":200},{"boxId":"94266080107X473","x":-97.150002,"y":107.550003,"z":346.950012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":7.300000,"platform":"platform09","order":115,"material":"","type":1,"place":200},{"boxId":"94266080107R644","x":-59.650002,"y":107.550003,"z":346.950012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":6.200000,"platform":"platform09","order":116,"material":"","type":1,"place":200},{"boxId":"94266080107Y809","x":-97.150002,"y":107.550003,"z":383.450012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":6.080000,"platform":"platform09","order":117,"material":"","type":1,"place":200},{"boxId":"94266080107Z589","x":-59.650002,"y":107.550003,"z":383.450012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":5.840000,"platform":"platform09","order":118,"material":"","type":1,"place":200},{"boxId":"94266080107U575","x":-23.900000,"y":104.300003,"z":309.200012,"width":34.000000,"height":17.000000,"length":34.000000,"weight":27.200001,"platform":"platform09","order":119,"material":"","type":1,"place":100},{"boxId":"94266080107U716","x":-23.900000,"y":104.300003,"z":343.200012,"width":34.000000,"height":17.000000,"length":34.000000,"weight":27.000000,"platform":"platform09","order":120,"material":"","type":1,"place":100},{"boxId":"94266080107U544","x":-23.900000,"y":121.300003,"z":309.200012,"width":34.000000,"height":17.000000,"length":34.000000,"weight":26.900000,"platform":"platform09","order":121,"material":"","type":1,"place":100},{"boxId":"94266080107U353","x":-23.900000,"y":121.300003,"z":343.200012,"width":34.000000,"height":17.000000,"length":34.000000,"weight":26.799999,"platform":"platform09","order":122,"material":"","type":1,"place":100},{"boxId":"94266080107Q597","x":-22.150000,"y":107.550003,"z":378.450012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":5.720000,"platform":"platform09","order":123,"material":"","type":1,"place":200},{"boxId":"94266080107X171","x":36.599998,"y":-66.849998,"z":352.200012,"width":80.000000,"height":126.300003,"length":120.000000,"weight":210.500000,"platform":"platform09","order":124,"material":"","type":1,"place":100},{"boxId":"94266080107X648","x":36.599998,"y":58.750000,"z":352.200012,"width":80.000000,"height":124.900002,"length":120.000000,"weight":192.000000,"platform":"platform09","order":125,"material":"","type":1,"place":100},{"boxId":"94266080107R642","x":95.750000,"y":-108.000000,"z":314.450012,"width":38.299999,"height":44.000000,"length":60.500000,"weight":27.799999,"platform":"platform09","order":126,"material":"","type":1,"place":100},{"boxId":"94266080107X614","x":95.750000,"y":-64.000000,"z":314.450012,"width":38.299999,"height":44.000000,"length":60.500000,"weight":22.500000,"platform":"platform09","order":127,"material":"","type":1,"place":100},{"boxId":"94266080107U329","x":95.750000,"y":-20.000000,"z":314.450012,"width":38.299999,"height":44.000000,"length":60.500000,"weight":18.059999,"platform":"platform09","order":128,"material":"","type":1,"place":100},{"boxId":"94266080107S145","x":95.750000,"y":24.000000,"z":314.450012,"width":38.299999,"height":44.000000,"length":60.500000,"weight":15.500000,"platform":"platform09","order":129,"material":"","type":1,"place":100},{"boxId":"94266080107Q557","x":95.750000,"y":68.000000,"z":314.450012,"width":38.299999,"height":44.000000,"length":60.500000,"weight":15.000000,"platform":"platform09","order":130,"material":"","type":1,"place":100},{"boxId":"94266080107X615","x":95.599998,"y":107.750000,"z":310.700012,"width":38.000000,"height":35.500000,"length":53.000000,"weight":17.900000,"platform":"platform09","order":131,"material":"","type":1,"place":100},{"boxId":"94266080107X661","x":95.349998,"y":-112.500000,"z":363.450012,"width":37.500000,"height":35.000000,"length":37.500000,"weight":9.600000,"platform":"platform09","order":132,"material":"","type":1,"place":100},{"boxId":"94266080107W951","x":95.349998,"y":-77.500000,"z":363.450012,"width":37.500000,"height":35.000000,"length":37.500000,"weight":7.220000,"platform":"platform09","order":133,"material":"","type":1,"place":100},{"boxId":"94266080107X663","x":95.349998,"y":-42.500000,"z":363.450012,"width":37.500000,"height":35.000000,"length":37.500000,"weight":4.820000,"platform":"platform09","order":134,"material":"","type":1,"place":100},{"boxId":"94266080107X470","x":95.349998,"y":-16.250000,"z":362.950012,"width":36.500000,"height":17.500000,"length":37.500000,"weight":5.660000,"platform":"platform09","order":135,"material":"","type":1,"place":200},{"boxId":"94266080107X647","x":95.349998,"y":1.250000,"z":362.950012,"width":36.500000,"height":17.500000,"length":37.500000,"weight":3.820000,"platform":"platform09","order":136,"material":"","type":1,"place":200},{"boxId":"94266080107R777","x":95.349998,"y":18.750000,"z":362.950012,"width":36.500000,"height":17.500000,"length":37.500000,"weight":1.940000,"platform":"platform09","order":137,"material":"","type":1,"place":200},{"boxId":"94266080107W841","x":95.349998,"y":36.250000,"z":362.950012,"width":36.500000,"height":17.500000,"length":37.500000,"weight":0.960000,"platform":"platform09","order":138,"material":"","type":1,"place":200},{"boxId":"94266080107X329","x":95.349998,"y":56.750000,"z":362.950012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":5.580000,"platform":"platform09","order":139,"material":"","type":1,"place":200},{"boxId":"94266080107Y538","x":95.349998,"y":80.250000,"z":362.950012,"width":36.500000,"height":23.500000,"length":37.500000,"weight":3.760000,"platform":"platform09","order":140,"material":"","type":1,"place":200},{"boxId":"94266080107S177","x":95.199997,"y":110.300003,"z":363.250000,"width":37.099998,"height":36.599998,"length":37.200001,"weight":10.420000,"platform":"platform09","order":141,"material":"","type":1,"place":200},{"boxId":"94266080107Y537","x":-55.900002,"y":-69.300003,"z":452.200012,"width":80.000000,"height":121.400002,"length":120.000000,"weight":137.000000,"platform":"platform09","order":142,"material":"","type":1,"place":200},{"boxId":"94266080107U350","x":-85.900002,"y":43.000000,"z":452.200012,"width":60.000000,"height":103.199997,"length":80.000000,"weight":72.000000,"platform":"platform09","order":143,"material":"","type":1,"place":100},{"boxId":"94266080107U572","x":-25.900000,"y":43.000000,"z":452.200012,"width":60.000000,"height":103.199997,"length":80.000000,"weight":69.500000,"platform":"platform09","order":144,"material":"","type":1,"place":100},{"boxId":"94266080107U356","x":-86.699997,"y":110.150002,"z":450.149994,"width":58.400002,"height":31.100000,"length":75.900002,"weight":31.959999,"platform":"platform09","order":145,"material":"","type":1,"place":100},{"boxId":"94266080107U355","x":-28.299999,"y":110.150002,"z":450.149994,"width":58.400002,"height":31.100000,"length":75.900002,"weight":31.959999,"platform":"platform09","order":146,"material":"","type":1,"place":100},{"boxId":"94266080107U352","x":42.599998,"y":-86.550003,"z":450.700012,"width":77.000000,"height":86.900002,"length":77.000000,"weight":87.000000,"platform":"platform09","order":147,"material":"","type":1,"place":100},{"boxId":"94266080107U542","x":42.599998,"y":0.350000,"z":450.700012,"width":77.000000,"height":86.900002,"length":77.000000,"weight":86.500000,"platform":"platform09","order":148,"material":"","type":1,"place":100},{"boxId":"94266080107U573","x":42.599998,"y":86.550003,"z":450.700012,"width":77.000000,"height":85.500000,"length":77.000000,"weight":87.000000,"platform":"platform09","order":149,"material":"","type":1,"place":100},{"boxId":"94266080107U331","x":98.099998,"y":-122.000000,"z":452.700012,"width":34.000000,"height":16.000000,"length":81.000000,"weight":3.220000,"platform":"platform09","order":150,"material":"","type":1,"place":100},{"boxId":"94266080107X679","x":98.099998,"y":-105.500000,"z":429.200012,"width":34.000000,"height":17.000000,"length":34.000000,"weight":25.900000,"platform":"platform09","order":151,"material":"","type":1,"place":100},{"boxId":"94266080107U982","x":-75.900002,"y":-78.800003,"z":523.200012,"width":60.000000,"height":102.400002,"length":80.000000,"weight":85.500000,"platform":"platform09","order":152,"material":"","type":1,"place":200},{"boxId":"94266080107U330","x":-75.900002,"y":23.600000,"z":523.200012,"width":60.000000,"height":102.400002,"length":80.000000,"weight":76.000000,"platform":"platform09","order":153,"material":"","type":1,"place":200},{"boxId":"94266080107U915","x":-75.900002,"y":96.750000,"z":523.200012,"width":60.000000,"height":43.900002,"length":80.000000,"weight":26.000000,"platform":"platform09","order":154,"material":"","type":1,"place":200},{"boxId":"94266080107U903","x":8.100000,"y":-100.750000,"z":521.200012,"width":56.000000,"height":58.500000,"length":88.000000,"weight":70.500000,"platform":"platform09","order":155,"material":"","type":1,"place":200},{"boxId":"94266080107X677","x":8.100000,"y":-42.250000,"z":521.200012,"width":56.000000,"height":58.500000,"length":88.000000,"weight":59.500000,"platform":"platform09","order":156,"material":"","type":1,"place":200},{"boxId":"94266080107S266","x":8.100000,"y":16.250000,"z":521.200012,"width":56.000000,"height":58.500000,"length":88.000000,"weight":26.500000,"platform":"platform09","order":157,"material":"","type":1,"place":200},{"boxId":"94266080107X475","x":4.100000,"y":87.250000,"z":523.200012,"width":60.000000,"height":83.500000,"length":80.000000,"weight":54.000000,"platform":"platform09","order":158,"material":"","type":1,"place":200},{"boxId":"94266080107W805","x":82.349998,"y":-108.000000,"z":512.349976,"width":38.299999,"height":44.000000,"length":60.500000,"weight":11.740000,"platform":"platform09","order":159,"material":"","type":1,"place":200},{"boxId":"94266080107Q598","x":82.349998,"y":-64.000000,"z":512.349976,"width":38.299999,"height":44.000000,"length":60.500000,"weight":11.460000,"platform":"platform09","order":160,"material":"","type":1,"place":200},{"boxId":"94266080107Q558","x":82.349998,"y":-20.000000,"z":512.349976,"width":38.299999,"height":44.000000,"length":60.500000,"weight":8.220000,"platform":"platform09","order":161,"material":"","type":1,"place":200},{"boxId":"94266080107U540","x":81.599998,"y":17.500000,"z":512.700012,"width":39.000000,"height":31.000000,"length":59.000000,"weight":21.000000,"platform":"platform09","order":162,"material":"","type":1,"place":200},{"boxId":"94266080107W806","x":78.349998,"y":50.549999,"z":512.349976,"width":38.299999,"height":35.099998,"length":52.500000,"weight":19.900000,"platform":"platform09","order":163,"material":"","type":1,"place":200},{"boxId":"94266080107S132","x":70.699997,"y":86.199997,"z":511.600006,"width":37.200001,"height":36.200001,"length":36.799999,"weight":10.400000,"platform":"platform09","order":164,"material":"","type":1,"place":100},{"boxId":"94266080107Q554","x":70.349998,"y":112.800003,"z":511.450012,"width":36.500000,"height":17.000000,"length":36.500000,"weight":9.110000,"platform":"platform09","order":165,"material":"","type":1,"place":100},{"boxId":"94266080107W870","x":-76.650002,"y":-93.250000,"z":573.450012,"width":40.500000,"height":73.500000,"length":78.500000,"weight":15.500000,"platform":"platform09","order":166,"material":"","type":1,"place":200},{"boxId":"94266080107U908","x":-75.150002,"y":-31.750000,"z":573.950012,"width":41.500000,"height":49.500000,"length":81.500000,"weight":56.000000,"platform":"platform09","order":167,"material":"","type":1,"place":200},{"boxId":"94266080107Q555","x":-76.650002,"y":12.250000,"z":573.450012,"width":40.500000,"height":38.500000,"length":78.500000,"weight":10.500000,"platform":"platform09","order":168,"material":"","type":1,"place":200},{"boxId":"94266080107W968","x":-89.650002,"y":41.750000,"z":574.450012,"width":42.500000,"height":20.500000,"length":52.500000,"weight":5.200000,"platform":"platform09","order":169,"material":"","type":1,"place":200},{"boxId":"94266080107S122","x":-97.900002,"y":60.500000,"z":571.200012,"width":36.000000,"height":17.000000,"length":36.000000,"weight":30.500000,"platform":"platform09","order":170,"material":"","type":1,"place":100}]';
			var jsonstr2 = '{"container_length":1192.000000,"container_width":231.800003,"container_height":260.000000,"container_max_load":null,"container_type_name":"40HQ"}'
            var objectArray= JSON.parse(jsonstr);
			var truckJsonObj = JSON.parse(jsonstr2);
            var container, stats;
            var camera, controls, scene, projector, renderer;
            var objects = [], plane;
            var mouse = new THREE.Vector2(), offset = new THREE.Vector3(), INTERSECTED, SELECTED; 
            init();
            animate();
            function init() {
                container = document.createElement( 'div' );
                document.body.appendChild( container );
                camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 );
                camera.position.x = -600;
                camera.position.y = 400;
                camera.position.z = 1000;
                controls = new THREE.TrackballControls( camera );
                controls.rotateSpeed = 1.0;
                controls.zoomSpeed = 1.2;
                controls.panSpeed = 0.8;
                controls.noZoom = false;
                controls.noPan = true;
                controls.staticMoving = false;
                controls.dynamicDampingFactor = 0.3;
                scene = new THREE.Scene();
                var ambientLight = new THREE.AmbientLight( Math.random() *0xffffff );
                scene.add( ambientLight );
                var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
                directionalLight.position.set( 0, 1, 0 );
                scene.add( directionalLight );
                var pointLight = new THREE.PointLight( 0xff0000, 1, 500 );
                pointLight.position.set( 0, 0, -200 );
                scene.add( pointLight );

                container_length = truckJsonObj.container_length;
                container_width = truckJsonObj.container_width;
                container_height = truckJsonObj.container_height;
                var cube_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( container_width, container_height, container_length, 1,1,1 ), 
                    new THREE.MeshBasicMaterial( { color:0xefb73e, wireframe:true } )
                );
                cube_1.position.x = 0;
                cube_1.position.y = 0;
                cube_1.position.z = 0;
                scene.add( cube_1 );

                truck_head_length = 145;
                var truck_head_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( 200, 100, truck_head_length, 1, 1, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_1.position.x = 0;
                truck_head_1.position.y = -50;
                truck_head_1.position.z = -(container_length/2 + truck_head_length/2);
                scene.add( truck_head_1 );
                
                truck_head_length_2 = 80;
                var truck_head_2 = new THREE.Mesh(
                    new THREE.BoxGeometry( 170, 60, truck_head_length_2, 1, 0, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_2.position.x = 0;
                truck_head_2.position.y = 30;
                truck_head_2.position.z = -(container_length/2 + truck_head_length_2/2);
                scene.add( truck_head_2 );
                
                truck_head_chimney_radius = 7;
                var truck_head_chimney1 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney1.position.x = 100;
                truck_head_chimney1.position.y = 50;
                truck_head_chimney1.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney1 );
                
                var truck_head_chimney2 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney2.position.x = -100;
                truck_head_chimney2.position.y = 50;
                truck_head_chimney2.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney2 );
        
                var truck_wheel_1 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_1.position.x = 110;
                truck_wheel_1.position.y = -100;
                truck_wheel_1.position.z = -(container_length/2 + truck_head_length_2/2 + 20) ;
                truck_wheel_1.rotation.x = 0;
                truck_wheel_1.rotation.y = 0;
                truck_wheel_1.rotation.z = 1.6;
                scene.add( truck_wheel_1 );
                
                var truck_wheel_2 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_2.position.x = -110;
                truck_wheel_2.position.y = -100;
                truck_wheel_2.position.z = -(container_length/2 + truck_head_length_2/2 + 20);
                truck_wheel_2.rotation.x = 0;
                truck_wheel_2.rotation.y = 0;
                truck_wheel_2.rotation.z = 1.6;
                scene.add( truck_wheel_2 );

                offset_2 = -240;
                var truck_wheel_5 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_5.position.x = container_width/2 + 5;
                truck_wheel_5.position.y = -100;
                truck_wheel_5.position.z = (container_length/2 + truck_head_length_2/2 + offset_2) ;
                truck_wheel_5.rotation.x = 0;
                truck_wheel_5.rotation.y = 0;
                truck_wheel_5.rotation.z = 1.6;
                scene.add( truck_wheel_5 );

                var truck_wheel_6 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_6.position.x = -container_width/2 - 5;
                truck_wheel_6.position.y = -100;
                truck_wheel_6.position.z = (container_length/2 + truck_head_length_2/2 + offset_2);
                truck_wheel_6.rotation.x = 0;
                truck_wheel_6.rotation.y = 0;
                truck_wheel_6.rotation.z = 1.6;
                scene.add( truck_wheel_6 );

                for (var i in objectArray) {
                    if (objectArray[i].type==2) {
						var cylinderTopR = objectArray[i].length / 2;
						var cylinderHeight = objectArray[i].height;
						if (objectArray[i].place == 1 || objectArray[i].place == 2)
						{
							cylinderHeight = objectArray[i].width;
						}
						
                        var object2 = new THREE.Mesh(
						    new THREE.CylinderGeometry(cylinderTopR, cylinderTopR, cylinderHeight, 60),
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object2.position.x = objectArray[i].x;
                        object2.position.y = objectArray[i].y;
                        object2.position.z = objectArray[i].z;
                        if (objectArray[i].place==1) {
                            object2.rotation.z = 55;
                        }
                        if (objectArray[i].place==2) {
                            object2.rotation.x = 55;
                        }
                        object2.width = objectArray[i].width;
                        object2.height = objectArray[i].height;
                        object2.length = objectArray[i].length;
                        object2.weight = objectArray[i].weight;
                        object2.platform = objectArray[i].platform;
                        object2.order = objectArray[i].order;
                        object2.materialInfo = objectArray[i].material;
                        object2.boxId = objectArray[i].boxId;
                        object2.type = objectArray[i].type;
                        object2.place = objectArray[i].place;
                        scene.add( object2 );
                        objects.push( object2 );
                    }
                    if (objectArray[i].type==1) {
						if (objectArray[i].place == 200)
						{
							var box_length = objectArray[i].width;
                            var box_width = objectArray[i].length;
						}
						else
						{
							var box_length = objectArray[i].length;
							var box_width = objectArray[i].width;
						}
						var box_height = objectArray[i].height;
                        var object = new THREE.Mesh(
                            new THREE.BoxGeometry( box_width, box_height, box_length, 1, 1, 1 ), 
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object.position.x = objectArray[i].x;
                        object.position.y = objectArray[i].y;
                        object.position.z = objectArray[i].z;
						object.length = objectArray[i].length;
						object.width = objectArray[i].width;
						object.height = objectArray[i].height;
                        object.weight = objectArray[i].weight;
                        object.platform = objectArray[i].platform;
                        object.order = objectArray[i].order;
                        object.materialInfo = objectArray[i].material;
                        object.boxId = objectArray[i].boxId;
                        object.type = objectArray[i].type;
                        object.place = objectArray[i].place;
                        scene.add( object );
                        objects.push( object );
                    }
                }

                plane = new THREE.Mesh(
                    new THREE.PlaneGeometry( 2000, 2000, 8, 8 ),
                    new THREE.MeshBasicMaterial( { color: 0x000000, opacity: 0.25, transparent: true, wireframe: true } )
                );
                plane.visible = true;
                scene.add( plane );
                projector = new THREE.Projector();
                renderer = new THREE.WebGLRenderer( { antialias: true } );
                renderer.sortObjects = false;
                renderer.setSize( window.innerWidth, window.innerHeight );
                renderer.shadowMapEnabled = true;
                renderer.shadowMapType = THREE.PCFShadowMap;
                container.appendChild( renderer.domElement );

                stats = new Stats();
                stats.domElement.style.position = 'absolute';
                stats.domElement.style.top = '0px';
                container.appendChild( stats.domElement );

                window.addEventListener( 'resize', onWindowResize, false );
                renderer.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );
                renderer.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );
                renderer.domElement.addEventListener( 'mouseup', onDocumentMouseUp, false );
            }

            function onDocumentMouseMove( event ) {
                event.preventDefault();
                mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
                mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    if ( INTERSECTED != intersects[ 0 ].object ) {
                        INTERSECTED = intersects[ 0 ].object;
                        plane.position.copy( INTERSECTED.position );
                        plane.lookAt( camera.position );
                    }
                    container.style.cursor = 'pointer';
                } else {
                    container.style.cursor = 'auto';
                }
            }

            function onDocumentMouseDown( event ) {
                event.preventDefault();
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    controls.enabled = false;  
                    SELECTED = intersects[ 0 ].object;
                    var info = '<B>' + 
                        'boxId: ' + SELECTED.boxId +
                        '</br> x: ' + SELECTED.position.x + 
                        '</br> y: ' + SELECTED.position.y + 
                        '</br> z: ' + SELECTED.position.z + 
                        '</br> width: ' + SELECTED.width + 
                        '</br> height: ' + SELECTED.height + 
                        '</br> length: ' + SELECTED.length + 
                        '</br> weight: ' + SELECTED.weight +
                        '</br> platform: ' + SELECTED.platform +
                        '</br> order: ' + SELECTED.order +
                        '</br> material: ' + SELECTED.materialInfo + 
                        '</br> type: ' + SELECTED.type + 
                        '</br> place: ' + SELECTED.place + 
                        '</B>' +
                        '</br>' + 
                        '--------------------------' + 
                        '</br>' +
                        'type(1:箱体 2:圆柱体)' +
                        '</br>' +
                        'place(1:品字型 2:田字型)';
                    $("#objectInfo").html(info);
                }
            }

            function onDocumentMouseUp( event ) {
                event.preventDefault();
                controls.enabled = true;
                if ( INTERSECTED ) {
                    plane.position.copy( INTERSECTED.position );
                    SELECTED = null;
                }
                container.style.cursor = 'auto';
            }

            function onWindowResize() {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize( window.innerWidth, window.innerHeight );
            }

            function animate() {
                requestAnimationFrame( animate );
                render();
                stats.update();
            }

            function render() {
                controls.update();
                renderer.render( scene, camera );
            }

        </script>
        <div id="objectInfo" class="a2"><br/>点击物体获取相关属性</div>
        <style>
            .a2{position:absolute; left:20px; top:50px; bottom:0px; width:180px; height:250px; z-index:9999; background: #00FFFF; font-weight:bold; }
        </style>
    </body>
</html>